﻿using DH.Core.Helper;
using System;
using System.Collections.Generic;
using System.Text;

namespace DH.Core.Exceptions
{
  public  class EntityNotFoundException:BaseException
    {
        public EntityNotFoundException(string message = Defaults.EntityNotFoundException.Title, Exception exception = null, Dictionary<string, IEnumerable<string>> messages = null)
           : base(message, exception, messages)
        { }

        public EntityNotFoundException(string entityName, object entityKey) : base(Defaults.EntityNotFoundException.Title, null, null)
        {
            base.AddMessage(String.Format("Entity of type '{0}' and key {1} not found in the current context.", entityName, entityKey));

        }
    }
}
